# frozen_string_literal: true

require 'rake/testtask'
require 'rspec/core/rake_task'
require 'rubocop'
require 'rubocop/rake_task'
require 'rubocop-rake'

task default: [:spec]

Rake::TestTask.new do |t|
  t.pattern = '*/**/tests/test_*.rb'
  t.verbose = true
  t.warning = false
end

desc 'Run specs.'
RSpec::Core::RakeTask.new do |t|
  t.pattern = '*/**/*_spec.rb'
  t.rspec_opts = ['--tag', 'integ', '--tag', '~@quarantine']
end

desc 'Run rubocop'
RuboCop::RakeTask.new(:rubocop) do |t|
  t.options = ['--config', '../.github/linters/.ruby-lint.yml']
  t.requires << 'rubocop-rake'
end
